<%@page import="org.serc.pensieve.model.*"%>
<%@page import="java.util.ArrayList"%>
<%@page import="com.sun.org.apache.xalan.internal.xsltc.runtime.Parameter"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
//HttpSession s = request.getSession();

String inspectionID = request.getParameter("insId");
out.println("inspectionID :"+inspectionID);

String checkListID = request.getParameter("checkListID");
//String inspectionID = request.getParameter("inspectionID");

String inspectionNum = request.getParameter("inspectionNum");

String inspectionName = request.getParameter("inspectionName");

String inspectionDescription = request.getParameter("inspectionDescription");

//out.println(srsID+"  "+checkListID);


//Getting NewInspectionObj from session.
ArrayList<UseCases> tempInspection //= new  ArrayList<Inspection>();
//tempInspection
        = (ArrayList<UseCases>)session.getAttribute("usecases1");
int sss = tempInspection.size();
//out.println(sss);
//out.print((String)tempInspection.get(0).SRSID);
//out.print(tempInspection.get(0).checkListID);
//Inspection aas = new Inspection();

//aas =tempInspection.get(0);
//out.print(sss);
//out.print(tempInspection.get(0).inspectionID);
//out.print(tempInspection.get(0).inspectionName);
//out.print(tempInspection.get(0).inspectionNum);
ArrayList<CheckList> tempCheckList = (ArrayList<CheckList>)session.getAttribute("checklist");
int checkListSize = tempCheckList.size();

//out.println(checkListSize);
%>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">

	<title>Inspection has started</title>
    <link href="yellow-effectz2.css" rel="stylesheet" type="text/css" />



<script type="text/javascript">


//Call when a All use case is completed inspection
function completedUseCase(){
	alert("You have completed the inspection process. Thanks for your Time");
	window.close();

}
//-------------------------------
function IsCompleteACtive(){

	document.getElementById('completeusecase').disabled = false;


	}

function gotoPending()
{
alert("Inspection sent to pending task");


}
//--------------------------------------

// called onload
function getUsecases()
{
   // alert("sdssds");

//	document.getElementById('completeusecase').disabled = true;
  //      gotoPending();
    //    alert("back from gptoPending task.");
    //Ajax call to retrieve the usecases of given SRS.

	var xmlhttp;


if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari

//alert("Received");

xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5

    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
//        document.getElementById('dd2').innerHTML = xmlhttp.responseText;newInspections
//document.getElementById("newInspections").innerHTML = xmlhttp.responseText;
alert(xmlhttp.responseText);
document.getElementById('qqq').innerHTML = xmlhttp.responseText;
//alert(xmlhttp.responseText);
}
}
xmlhttp.open("GET","../PreparationController?action=getUsecases&srsID=1",true);
xmlhttp.send();

//loadcheckList();

}


function loadcheckList()
{

//alert("loading check list");

	var xmlhttp;


if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari

//alert("Received");

xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5

    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
//        document.getElementById('dd2').innerHTML = xmlhttp.responseText;newInspections
//document.getElementById("newInspections").innerHTML = xmlhttp.responseText;
alert(xmlhttp.responseText);
}
}
xmlhttp.open("GET","../PreparationController?action=getcheckList&checkListID=1",true);
xmlhttp.send();

}

function aaa(useCaseId,srsId,inspectionId,id)
{
   /* alert("my id is : " +id);
    alert("use id is : " +useCaseId);
    alert("srs id is : " +srsId);
    alert("inspection id is : " +inspectionId);
    alert("text field id is"+errordesID);
 */
     var errordesID = "errorDes_"+id;
     var passOrFail = "Fail";
     var errorDescription = document.getElementById(errordesID).value;
//alert(errorDescription);
   if(document.getElementById('passorFail').checked)
        {
            alert("yes pass");
            passOrFail = "Pass";
        }
        //Ajax call to save this data into DB

        var xmlhttp;


        if (window.XMLHttpRequest)
        {// code for IE7+, Firefox, Chrome, Opera, Safari

        //alert("Received");

        xmlhttp=new XMLHttpRequest();
        }
        else
        {// code for IE6, IE5

            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange=function()
        {
        if (xmlhttp.readyState==4 && xmlhttp.status==200)
        {
        //        document.getElementById('dd2').innerHTML = xmlhttp.responseText;newInspections
        //document.getElementById("newInspections").innerHTML = xmlhttp.responseText;
        alert(xmlhttp.responseText);
        }
        }
        xmlhttp.open("GET","../PreparationController?action=savestate&usecaseID="+useCaseId+"&errorDes="+errorDescription+"&passFailval="+passOrFail+"&srsId="+srsId+"&inspectionId="+inspectionId,true);
        xmlhttp.send();

}
function pauseplay(){
		//alert("ssodisioduis"+document.getElementById('pause').innerHTML);
	if(document.getElementById('pause').innerHTML == "PAUSE")
	{
		document.getElementById('pause').innerHTML = "PLAY";
	}
	else
	{

		document.getElementById('pause').innerHTML = "PAUSE";

	}
}
		//-------------------------------------------
		function toggle(listElem){

	//		alert(listElem);
	 if(document.getElementById(listElem).style.display ==  "block")
	{

		document.getElementById(listElem).style.display = 'none';
	}
	else if(document.getElementById(listElem).style.display == "none")
	{
 		document.getElementById(listElem).style.display = 'block';
	}
                }
</script>

<style type="text/css" media="screen">
		/*
			Load CSS before JavaScript
		*/

		/*
			Slides container
			Important:
			Set the width of your slides container
			Set to display none, prevents content flash
		*/
.listElem{font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;font-size:14px;color:#009;	padding:5px;cursor:pointer;}
#timer{margin-left: 758px;font-family: cursive;background-color: wheat;text-align: center;}
body{background-color:whitesmoke;}
#pause{ font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;cursor: pointer;font-size: 24px;color: red;display: inline;margin-left: 75px;}
#rightContainer {position: absolute;top: 70px;background-color: snow;min-height: 700px;width: 220px;left: 757px;border: 3px solid gray;border-image: initial;}
#leftCotainer{border: 3px solid gray;float:left;}
.slides_container {position:absolute;width:470px;display:none;}

		/*
			Each slide
			Important:
			Set the width of your slides
			If height not specified height will be set by the slide content
			Set to display block
		*/
.slides_container div {	width:470px;height:170px;display:block;}
.prev{margin-left: 180px;color: slateBlue;text-decoration: none;font-size: 20px;}
.next{margin-left: 501px;color: slateBlue;text-decoration: none;font-size: 20px;}
		/*
			Optional:
			Reset list default style
		*/
.pagination {float: left;list-style: none;margin-bottom: 76px;padding: 0;position: absolute;background-color: snow;min-height: 700px;width: 170px;border:3px solid gray;}
		/*
			Optional:

		Show the current slide in the pagination
		*/
.pagination .current a {color:red;background-image:url(checked.png);background-repeat:no-repeat;background-position:left;}
</style>

<!--including scripts for slider-->
<script src="jquery.min.js"></script>
<script src="js/slides.min.jquery.js"></script>
<!-- -->


<script>
		$(function(){
			$('#slides').slides({
				preload: true,
				generateNextPrev: true
			});
		});
</script>

<script type="text/javascript">
    
    function hideitnow(inspId,useId,srsId)
    {
       // alert("ispection id : "+inspId+"use case id : "+useId+srsId);
        
        //Ajax call for new meetings.
        
          
         var xmlhttp;
        if (window.XMLHttpRequest)
        {// code for IE7+, Firefox, Chrome, Opera, Safari
          xmlhttp=new XMLHttpRequest();
        }
        else
        {// code for IE6, IE5
            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange=function()
        {
            if (xmlhttp.readyState==4 && xmlhttp.status==200)
            {
               //        document.getElementById('dd2').innerHTML = xmlhttp.responseText;newInspections
             //document.getElementById("newInspections").innerHTML = xmlhttp.responseText;
//                 alert(xmlhttp.responseText);
           alert("Your Error Description is Sucessfully recorded!");
         //        document.getElementById('qqq').innerHTML = xmlhttp.responseText;
             //alert(xmlhttp.responseText);
            }
        }//hidethisid,usecaseIdd,selectedTextIs,srsIdd,InspectionIdd
        xmlhttp.open("GET","../PreparationController?action=creatingmeetings&srsID="+srsId+"&usecaseid="+useId+"&inspectionId="+inspId,true);
        xmlhttp.send();
      
      // ::::::::::::::::: END OF AJAX CALL :::::::::::::::://  
        
        
        alert("Closing inspection, Thanks for your time");
        
        window.close();
    }
//When mouse pressed, Function will save value to this variable.
var pressedValueX;
var pressedValueY;
//When mouse release, Function will save  value to this function.
var releasedValueX;
var releasedValueY;


//
//global counter//
 var idCOUNT = 0;
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::://
//:::::::::::::::::::::::  CALCULATE POSITIONS :::::::::::::::::::::::::::::::::::::://
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::://

//This Function will give the positions of the selected area.
var isIE = document.all?true:false;
//document.onmousemove = getMousePosition;
function getMousePosition(e) {
  // alert("X-position:&nbsp;"+posX+";&nbsp;Y-position:&nbsp;"+posY+".");
  var _x;
  var _y;
  if (!isIE) {
    _x = e.pageX;
    _y = e.pageY;
  }
  if (isIE) {
    _x = event.clientX + document.body.scrollLeft;
    _y = event.clientY + document.body.scrollTop;
  }

posX=_x;
posY=_y;
//alert("X-position:&nbsp;"+posX+";&nbsp;Y-position:&nbsp;"+posY+".");
  return true;

}

//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::://
//::::::::::::::::::::::: <!--  CALCULATE POSITIONS  --> :::::::::::::::::::::::::::::::::::::://
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::://



function mousePress(e)
{


//alert("pressed");
    
    var _x;
    var _y;
  if (!isIE) {
    _x = e.pageX;
    _y = e.pageY;
  }
  if (isIE) {
    _x = event.clientX + document.body.scrollLeft;
    _y = event.clientY + document.body.scrollTop;
  }

pressedValueX=_x;
pressedValueY=_y;
//alert("X-position:&nbsp;"+posX+";&nbsp;Y-position:&nbsp;"+posY+".");
  return true;

    
}

//event,maded id,usecase id,srsid,inspection ID
function mouseRelease(e,newdivID,UseCaseId,srsIDD,InspectionIDD)
{
//alert(srsIDD+","+InspectionIDD);
//alert("released");
    var _x;
    var _y;

   if (!isIE) {
//alert(1);
    _x = e.pageX;
//alert(1);

_y = e.pageY;
  }

  if (isIE) {
    _x = event.clientX + document.body.scrollLeft;
    _y = event.clientY + document.body.scrollTop;
  }
releasedValueX=_x;
releasedValueY=_y;
//alert("X-position:&nbsp;"+posX+";&nbsp;Y-position:&nbsp;"+posY+".");
//alert("pressed X :"+pressedValueX+" pressed Y :"+pressedValueY +" released X"+ releasedValueX + "released Y " + releasedValueY);


//--------------------------------------

// :::::::::::::::: Heighlighting code :::::::::::::::::::::://
    var selection = window.getSelection().getRangeAt(0);
    var selectedText = selection.extractContents();
    var span = document.createElement("span");
    span.style.backgroundColor = "yellowGreen";
    span.style.borderRadius = "5";
    span.style.padding ="2px";
    span.style.color="whiteSmoke";
    span.style.fontWeight= "bold";

    span.onmouseover = function(){






      //  alert(document.getElementById(newdivID).childNodes[0].value);
        var tempss = document.getElementById(newdivID).childNodes[0].value;
        document.getElementById('tempsave').innerHTML = tempss;
        document.getElementById('khulo').style.display = "block";
//alert("Show hover on it!");




        
    }
    
    span.appendChild(selectedText);
//    alert("selectedText  1 is : "+ selectedText.value);
    span.id = "span_"+newdivID+"_"+idCOUNT.toString();
   // alert("and innerHTML is"+document.getElementById(span.id).innerHTML);
    /*span.onclick = function (ev) {
       alert(this);
        this.parentNode.insertBefore(document.createTextNode(this.innerHTML), this);
        this.parentNode.removeChild(this);
    }*/
     selection.insertNode(span);
     //alert("span is : "+span)
     //alert("span.id is : "+span.id);
//     alert("and innerHTML is"+document.getElementById(span.id).innerHTML);
  var passTextToSaveFunc = document.getElementById(span.id).innerHTML;

  
//	document.getElementById('khulo').style.display = "block";

        //----------------------------------------------------------------//
// :::::::::::: generate unique stikky note div ::::::::::::::::::://

//alert(newdivID);
    newdivID = newdivID + "_"+ idCOUNT.toString();
    idCOUNT++;
        var newdiv = document.createElement('div');
        newdiv.setAttribute('id', newdivID);
        newdiv.setAttribute('style', 'opacity:0.8;background-color:black;z-index:1000');

newdiv.innerHTML =  "<textarea id=\"snippet_"+newdivID+"\" rows=\"7\" name=\"newdivID\" style=\"background-color:#FF9;display:block;\"></textarea><input type=\"button\" id =\"\" value=\"Save\" onclick=\"saveandhideDIV('"+newdiv.id+"','"+UseCaseId+"','"+passTextToSaveFunc+"','"+srsIDD+"','"+InspectionIDD+"')\"/>";

        document.getElementById('tempu').appendChild(newdiv);
//
// -----------------------------------------------------------------//
// :::::::::::: positioning the div right after selection ends ::::::::::::://

        ten =10;
        document.getElementById(newdivID).style.position = "absolute";
        document.getElementById(newdivID).style.left = releasedValueX.toString();
        document.getElementById(newdivID).style.top = releasedValueY.toString();
//-----------------------------------------------------------------------------//

 return true;


}

function saveandhideDIV(hidethisid,usecaseIdd,selectedTextIs,srsIdd,InspectionIdd)
{
//    alert(" selectedTextIs "+selectedTextIs);
  //  alert("usecase Id is : "+usecaseID);

    //  alert("Child nodes are : "+document.getElementById(hidethisid).childNodes[0].childNodes[0]);

        //alert(hidethisid+","+usecaseIdd+","+selectedTextIs+","+srsIdd+","+InspectionIdd);
        idIS= "snippet_"+hidethisid;
        //alert(document.getElementById(idIS).value);//:::::::::::::: AJAX CALL to save selected key value pairs ::::::::::::::::://
        textOfSnippet = document.getElementById(idIS).value;
        
         var xmlhttp;
        if (window.XMLHttpRequest)
        {// code for IE7+, Firefox, Chrome, Opera, Safari
          xmlhttp=new XMLHttpRequest();
        }
        else
        {// code for IE6, IE5
            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange=function()
        {
            if (xmlhttp.readyState==4 && xmlhttp.status==200)
            {
               //        document.getElementById('dd2').innerHTML = xmlhttp.responseText;newInspections
             //document.getElementById("newInspections").innerHTML = xmlhttp.responseText;
//                 alert(xmlhttp.responseText);
           alert("Your Error Description is Sucessfully recorded!");
         //        document.getElementById('qqq').innerHTML = xmlhttp.responseText;
             //alert(xmlhttp.responseText);
            }
        }//hidethisid,usecaseIdd,selectedTextIs,srsIdd,InspectionIdd
        xmlhttp.open("GET","../PreparationController?action=saveSelectedKeyValuePair&srsID="+srsIdd+"&usecaseid="+usecaseIdd+"&inspectionId="+InspectionIdd+"&selectedText="+selectedTextIs+"&textOfSnippet="+textOfSnippet,true);
        xmlhttp.send();
        // :::::::::::::: AJAX CALL for saving selected key value Strings Ends  ::::::::::::::::::::::://



        //hiding snippet//
         document.getElementById(hidethisid).style.display = "none";
}
//remove selection //
function removeSelection(idSelection)
{

      // alert(this);
        this.parentNode.insertBefore(document.createTextNode(this.innerHTML), this);
        this.parentNode.removeChild(this);
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::;//
//::::::::::::::::::::::::::::::::::::;DO LATER THIS CODE ::::::::::::::::::::::::::::::::::::::::::://
//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::;//

}
</script>
</head>

<body onload="tt()" onmousedown="mousePress(event)"> <!--onmouseup="mouseRelease(event)"><!--onload="getUsecases()">-->
<div id="slides">
    <div id="qqq" class="slides_container" style="margin-left: 220px; min-height: 700px; overflow-x: hidden; overflow-y: hidden; position: absolute; display: block; background-color: whitesmoke;color: slategrey;">
<!--	<div style="position:absolute">
        	<h1 id="rtrtrt">Usecase 1</h1>
                    <b>Use Case Actors</b>
                    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim</p>
                    <b>Use case description</b>
                    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim</p>
                    <b>Use case preconditions </b>
                    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim</p>
                    <b>Use Case Post conditions</b>
                    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim</p>

                    <b>Use Case Main Flow</b>
                    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim</p>
                    <b>Use Case Alternative Flow</b>
                    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim</p>


                   <div id="lowerAreaOfSlide">
                     <br>
                     <br>
                     <input type="text"  placeholder="Add Description for this use Case" style="background-color: white;height: 40px;width: 458px;" />
                     <br>
                     <br>
                     <input type="button" id="completeusecase" value="Complete" style="background-color: wheat;height: 35px;width: 80px;"/>
                     <p id="pause" onclick="pauseplay()">PAUSE</p>
                     <input type="checkbox"  style="margin-left: 45px;" >Check to PASS this use case.</input>
                     <input type="checkbox"  style="margin-left: 277px;" >Done with this useCase</input>
                    </div>
        </div>
-->
<%
for(int i=0;i<tempInspection.size();i++)
{
    //This ID is use case ID, so that comments can be place according to correct usecase.
    //out.println("<div class=\"slides_container\" style=\"margin-left: 220px; min-height: 700px; overflow-x: hidden; overflow-y: hidden; position: absolute; display: block; background-color: whitesmoke;color: slategrey;\">");

    // spliting all the words of use cases on spaces and assign them unique ids.
    //UNIQUE ID = InpspectionID + Usecase ID


// Temp variables to to spilt them on ' '(space) and save them in temp String array defined below.
    String ac =  tempInspection.get(i).actors;
    String uc =  tempInspection.get(i).useCaseDescription;
    String pc =  tempInspection.get(i).preConditions;
    String poc = tempInspection.get(i).postConditions;
    String mf  = tempInspection.get(i).mainFlow;
    String af = tempInspection.get(i).alternativeFlow;
   
    String [] Actors = ac.split(" ");
    String [] useCaseDescription = uc.split(" ");
    String [] preConditions = pc.split(" ");
    String [] postConditions = poc.split(" ");
    String [] mainFlow = mf.split(" ");
    String [] alternativeFlow = af.split(" ");
// <!-- Temp Variables --> //

// Making HTML by adding spans //

   // html variables //
   String htmlActors = "";
   String htmluseCaseDescription = "";
   String htmlpreConditions = "";
   String htmlpostConditions = "";
   String htmlmainFlow = "";
   String htmlalternativeFlow = "";
   // <!-- html variables -->


   // :::: For Actors :::: //
    for(int y=0;y<Actors.length;y++)
    {
            //Pattern for id is :=>             id='inspectionid_usecaseid_forloop' //

               htmlActors += "<span id='Actors_"+inspectionID+"_"+tempInspection.get(i).ID+"_"+y+"'>"+Actors[y]+" "+"</span>";
   }


    // :::: For useCaseDescription :::: //
    for(int y=0;y<useCaseDescription.length;y++)
    {
               htmluseCaseDescription += "<span id='useCaseDescription_"+inspectionID+"_"+tempInspection.get(i).ID+"_"+y+"'>"+useCaseDescription[y]+" "+"</span>";

    }



    // :::: For preConditions :::: //
    for(int y=0;y<preConditions.length;y++)
    {

          htmlpreConditions += "<span id='preConditions_"+inspectionID+"_"+tempInspection.get(i).ID+"_"+y+"'>"+preConditions[y]+" "+"</span>";

    
    }

    // :::: For postConditions :::: //
    for(int y=0;y<postConditions.length;y++)
    {

         htmlpostConditions += "<span id='postConditions_"+inspectionID+"_"+tempInspection.get(i).ID+"_"+y+"'>"+postConditions[y]+" "+"</span>";

  
    }


    // :::: For mainFlow :::: //
    for(int y=0;y<mainFlow.length;y++)
    {

         htmlmainFlow += "<span id='mainFlow_"+inspectionID+"_"+tempInspection.get(i).ID+"_"+y+"'>"+mainFlow[y]+" "+"</span>";

  

    }
    

    // :::: For mainFlow :::: //
    for(int y=0;y<alternativeFlow.length;y++)
    {

             htmlalternativeFlow += "<span id=alternativeFlow_"+inspectionID+"_"+tempInspection.get(i).ID+"_"+y+"'>"+alternativeFlow[y]+" "+"</span>";

    }
    
//    Actors = tempInspection.get(i).actors;
  //  String str  = " use case number 1";
//    String [] temp = null;

    //temp = str.split(" ");
    //System.out.println("Size of array temp is :" + temp.length);
/*    for(int y=0;y<temp.length;y++)
    {

       System.out.println("array elementent : "+temp[y]);

    }

*/

                out.println("	<div style=\"position:absolute\">");
        	out.println("<h1 id=\"rtrtrt\">Usecase"+(i+1)+"</h1>");
                out.println("    <b>Use Case Actors</b>");//event,maded id,usecase id,srsid,inspection ID
                out.println("         <p onmouseup=\"mouseRelease(event,'Actors_"+inspectionID+"_"+tempInspection.get(i).ID+"_"+i+"',"+tempInspection.get(i).ID+",'"+tempInspection.get(i).SRSID+"','"+inspectionID+"')\">"+tempInspection.get(i).actors+"</p>");
//                 out.println("         <p>"+htmlActors+"</p>");
                out.println("   <b>Use case description</b>");
                out.println("    <p onmouseup=\"mouseRelease(event,'description_"+inspectionID+"_"+tempInspection.get(i).ID+"_"+i+"',"+tempInspection.get(i).ID+",'"+tempInspection.get(i).SRSID+"','"+inspectionID+"')\">"+tempInspection.get(i).useCaseDescription+"</p>");
              //    out.println("    <p>"+htmluseCaseDescription+"</p>");
                out.println("    <b>Use case preconditions </b>");
                //out.println("     <p>"+htmlpreConditions+"</p>");
                out.println("     <p onmouseup=\"mouseRelease(event,'preconditions_"+inspectionID+"_"+tempInspection.get(i).ID+"_"+i+"',"+tempInspection.get(i).ID+",'"+tempInspection.get(i).SRSID+"','"+inspectionID+"')\">"+tempInspection.get(i).preConditions+"</p>");
                out.println("    <b>Use Case Post conditions</b>");
                //out.println("   <p>"+htmlpostConditions+"</p>");
                out.println("     <p onmouseup=\"mouseRelease(event,'postcondition_"+inspectionID+"_"+tempInspection.get(i).ID+"_"+i+"',"+tempInspection.get(i).ID+",'"+tempInspection.get(i).SRSID+"','"+inspectionID+"')\">"+tempInspection.get(i).postConditions+"</p>");
                out.println("    <b>Use Case Main Flow</b>");
 //               out.println("    <p>"+htmlmainFlow+"</p>");
                out.println("     <p onmouseup=\"mouseRelease(event,'mainflow_"+inspectionID+"_"+tempInspection.get(i).ID+"_"+i+"',"+tempInspection.get(i).ID+",'"+tempInspection.get(i).SRSID+"','"+inspectionID+"')\">"+tempInspection.get(i).mainFlow+"</p>");
                            out.println("      <b>Use Case Alternative Flow</b>");
//                out.println("     <p>"+htmlalternativeFlow+"</p>");
                    out.println("     <p onmouseup=\"mouseRelease(event,'alternativeFlow_"+inspectionID+"_"+tempInspection.get(i).ID+"_"+i+"',"+tempInspection.get(i).ID+",'"+tempInspection.get(i).SRSID+"','"+inspectionID+"')\">"+tempInspection.get(i).alternativeFlow+"</p>");
                                            out.println("    <div id=\"lowerAreaOfSlide\">");
                out.println("        <br>");
                out.println("       <br>");
                out.println("        <input type=\"text\" id=\"errorDes_"+i+"\" placeholder=\"Add Description for this use Case\" style=\"background-color: white;height: 40px;width: 458px;\" />");
                out.println("     <br>");
                out.println("    <br>");
                out.println("   <input type=\"button\" id=\"completeusecase\" value=\"Complete\" onclick=\"hideitnow("+inspectionID+","+tempInspection.get(i).ID+","+tempInspection.get(i).SRSID+")\" style=\"background-color: wheat;height: 35px;width: 80px;\"/>");
              //  out.println("    <p id=\"pause\" onclick=\"pauseplay()\">PAUSE</p>");
                out.println("     <input type=\"checkbox\" id=\"passorFail\" style=\"margin-left: 45px;\" >Check to PASS this use case.</input>");
             //     out.println("   <input type=\"checkbox\" id="+i+" onclick=aaa('sdsds',"+i+") style=\"margin-left: 277px;\" >Done with this useCase</input>");


   out.println("   <input type=\"button\" id="+i+" onclick=aaa('"+tempInspection.get(i).ID+"','"+tempInspection.get(i).SRSID+"','"+inspectionID+"','"+i+"') style=\"margin-left: 277px;\" value='Save' ></input>");
             
                                              out.println("     </div>");
   out.println("     </div>");


            }%>
         
    </div><!-- DIV SLIDES CONTENT CONTAINER ENDS HERE! -->
    <div id="rightContainer">
        <h1 style="margin-top: -1px;">Check List</h1>
        <ol style="">
<%
         for(int j=0;j<tempCheckList.size();j++)
            {
              out.println("<li class=\"listElem1\"  style=\"cursor:pointer;\" onClick=\"toggle('plistElem"+j+"')\">"+tempCheckList.get(j).elemHeading+" </li><p id=\"plistElem"+j+"\"  style=\"display:none; color:#666; background:#FFF; font-family:'Comic Sans MS', cursive;\">"+tempCheckList.get(j).elemData+"</p>");

            }
%>
     </ol>
    </div>
    <div id="timer">00 : 00 : 00</div>
</div>
<!--    Div for snippet -->


<div id="khulo" style="display:none;

height:100px; width:auto; opacity:0.8;">


<span  id="tempsave" style="
    background-color: white;
    color: red;
    border: 1px gray solid;
    border-radius: 5;
    width: auto;
    padding: 10px;
    position: absolute;
    right: 240px;
">

        Previously saved error error Error description will go here.


    </span>
  
</div>

<div id="tempu"></div>
<!-- Div for snippet -->

     <!-- DIV 'SLIDES' ENDS HERE -->

</body>
</html>
